﻿
'*******************************************************************
' Program: Data Center Visio Rack Tool
' Author: Albert E Edlund
' Date:
'
' Purpose:
'
'
'
'*******************************************************************


Imports Microsoft.Practices.EnterpriseLibrary.Common
Imports Microsoft.Practices.EnterpriseLibrary.Data
Imports Microsoft.Practices.EnterpriseLibrary.ExceptionHandling
Imports Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging


Imports System
Imports System.ComponentModel
Imports System.Collections.Generic



Public Class dc_Asset
    Implements INotifyPropertyChanged


#Region "Events"

    Public Event PropertyChanged(ByVal sender As Object, ByVal e As System.ComponentModel.PropertyChangedEventArgs) Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged

    Private Sub OnPropertyChanged(ByVal info As String)
        RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(info))
    End Sub

#End Region

#Region " Constructor "

    Public Sub New()
        initProperties()
    End Sub

    Public Sub New(ByVal strUserId As String)
        initProperties()
        Me.m_assetLastEdit = strUserId
    End Sub

#End Region

#Region " Properties and Fields "

    Private Const constAssetId As String = ""
    Private Const constAssetVendorKey As Int32 = -1
    Private Const constAssetComponentKey As Int32 = -1
    Private Const constAssetVendor As String = ""
    Private Const constAssetProduct As String = ""
    Private Const constAssetModel As String = ""
    Private Const constAssetPartNumber As String = ""
    Private Const constAssetProductDescription As String = ""
    Private Const constAssetSerial As String = ""
    Private Const constAssetPurchaseOrder As String = ""
    Private Const constAssetPurchaseDate As DateTime = #1/1/2001#
    Private Const constAssetInventoryDate As DateTime = #1/1/2001#
    Private Const constAssetInstallDate As DateTime = #1/1/2001#
    Private Const constAssetOwner As String = ""
    Private Const constAssetCost As Double = 0.0
    Private Const constAssetWarrantyExpDate As DateTime = #1/1/2001#
    Private Const constAssetSupportContract As String = ""
    Private Const constAssetSupportContactName As String = ""
    Private Const constAssetSupportContactPhone As String = "312-555-1212"
    Private Const constAssetComments As String = "none"
    Private Const constAssetLastUpdate As DateTime = #1/1/2001#
    Private Const constAssetLastEdit As String = ""

    Private m_assetid As String
    Public Property assetId() As String
        Get
            Return Me.m_assetid
        End Get
        Set(ByVal value As String)
            m_assetid = value
        End Set
    End Property

    Private m_assetVendorKey As Int32
    Public Property assetVendorKey() As Int32
        Get
            Return Me.m_assetVendorKey
        End Get
        Set(ByVal value As Int32)
            m_assetVendorKey = value
        End Set
    End Property

    Private m_assetComponentKey As Int32
    Public Property assetComponentKey() As Int32
        Get
            Return Me.m_assetComponentKey
        End Get
        Set(ByVal value As Int32)
            m_assetComponentKey = value
        End Set
    End Property

    Private m_assetVendor As String
    Public Property assetVendor() As String
        Get
            Return Me.m_assetVendor
        End Get
        Set(ByVal value As String)
            m_assetVendor = value
        End Set
    End Property

    Private m_assetProduct As String
    Public Property assetProduct() As String
        Get
            Return Me.m_assetProduct
        End Get
        Set(ByVal value As String)
            m_assetProduct = value
        End Set
    End Property

    Private m_assetModel As String
    Public Property assetModel() As String
        Get
            Return Me.m_assetModel
        End Get
        Set(ByVal value As String)
            m_assetModel = value
        End Set
    End Property

    Private m_assetPartNumber As String
    Public Property assetPartNumber() As String
        Get
            Return Me.m_assetPartNumber
        End Get
        Set(ByVal value As String)
            m_assetPartNumber = value
        End Set
    End Property

    Private m_assetProductDescription As String
    Public Property assetProductDescription() As String
        Get
            Return Me.m_assetProductDescription
        End Get
        Set(ByVal value As String)
            m_assetProductDescription = value
        End Set
    End Property

    Private m_assetSerial As String
    Public Property assetSerial() As String
        Get
            Return Me.m_assetSerial
        End Get
        Set(ByVal value As String)
            m_assetSerial = value
        End Set
    End Property

    Private m_assetPurchaseOrder As String
    Public Property assetPurchaseOrder() As String
        Get
            Return Me.m_assetPurchaseOrder
        End Get
        Set(ByVal value As String)
            m_assetPurchaseOrder = value
        End Set
    End Property

    Private m_assetPurchaseDate As DateTime
    Public Property assetPurchaseDate() As DateTime
        Get
            Return Me.m_assetPurchaseDate
        End Get
        Set(ByVal value As DateTime)
            m_assetPurchaseDate = value
        End Set
    End Property

    Private m_assetInventoryDate As DateTime
    Public Property assetInventoryDate() As DateTime
        Get
            Return Me.m_assetInventoryDate
        End Get
        Set(ByVal value As DateTime)
            m_assetInventoryDate = value
        End Set
    End Property

    Private m_assetInstallDate As DateTime
    Public Property assetInstallDate() As DateTime
        Get
            Return Me.m_assetInstallDate
        End Get
        Set(ByVal value As DateTime)
            m_assetInstallDate = value
        End Set
    End Property

    Private m_assetOwner As String
    Public Property assetOwner() As String
        Get
            Return Me.m_assetOwner
        End Get
        Set(ByVal value As String)
            m_assetOwner = value
        End Set
    End Property

    Private m_assetCost As Double
    Public Property assetCost() As Double
        Get
            Return Me.m_assetCost
        End Get
        Set(ByVal value As Double)
            m_assetCost = value
        End Set
    End Property

    Private m_assetWarrantyExpDate As DateTime
    Public Property assetWarrantyExpDate() As DateTime
        Get
            Return Me.m_assetWarrantyExpDate
        End Get
        Set(ByVal value As DateTime)
            m_assetWarrantyExpDate = value
        End Set
    End Property

    Private m_assetSupportContract As String
    Public Property assetSupportContract() As String
        Get
            Return Me.m_assetSupportContract
        End Get
        Set(ByVal value As String)
            m_assetSupportContract = value
        End Set
    End Property

    Private m_assetSupportContactName As String
    Public Property assetSupportContactName() As String
        Get
            Return Me.m_assetSupportContactName
        End Get
        Set(ByVal value As String)
            m_assetSupportContactName = value
        End Set
    End Property

    Private m_assetSupportContactPhone As String
    Public Property assetSupportContactPhone() As String
        Get
            Return Me.m_assetSupportContactPhone
        End Get
        Set(ByVal value As String)
            m_assetSupportContactPhone = value
        End Set
    End Property

    Private m_assetComments As String
    Public Property assetComments() As String
        Get
            Return Me.m_assetComments
        End Get
        Set(ByVal value As String)
            m_assetComments = value
        End Set
    End Property

    Private m_assetLastUpdate As DateTime
    Public Property assetLastUpdate() As DateTime
        Get
            Return Me.m_assetLastUpdate
        End Get
        Set(ByVal value As DateTime)
            m_assetLastUpdate = value
        End Set
    End Property

    Private m_assetLastEdit As String
    Public Property assetLastEdit() As String
        Get
            Return Me.m_assetLastEdit
        End Get
        Set(ByVal value As String)
            m_assetLastEdit = value
        End Set
    End Property




#End Region

#Region " Methods "


    Public Sub initProperties()

        Try
            assetId = constAssetId
            assetVendorKey = constAssetVendorKey
            assetComponentKey = constAssetComponentKey
            assetVendor = constAssetVendor
            assetProduct = constAssetProduct
            assetModel = constAssetModel
            assetPartNumber = constAssetPartNumber
            assetProductDescription = constAssetProductDescription
            assetSerial = constAssetSerial
            assetPurchaseOrder = constAssetPurchaseOrder
            assetPurchaseDate = constAssetPurchaseDate
            assetInventoryDate = constAssetInventoryDate
            assetInstallDate = constAssetInstallDate
            assetOwner = constAssetOwner
            assetCost = constAssetCost
            assetWarrantyExpDate = constAssetWarrantyExpDate
            assetSupportContract = constAssetSupportContract
            assetSupportContactName = constAssetSupportContactName
            assetSupportContactPhone = constAssetSupportContactPhone
            assetComments = constAssetComments
            assetLastUpdate = Now
            assetLastEdit = constAssetLastEdit


        Catch ex As Exception
            Dim rethrow As Boolean = ExceptionPolicy.HandleException(ex, "Log Only Policy")
            If (rethrow) Then
                Throw
            End If
        End Try

    End Sub




#End Region


End Class



